Skip to content

feat: living-docs add-on - state file, rendered blocks, deterministic doc checks - #8

Merged
PBNZ merged 1 commit into
mainfrom
feat/living-docs-addon
Jul 13, 2026
Merged

feat: living-docs add-on - state file, rendered blocks, deterministic doc checks#8
PBNZ merged 1 commit into
mainfrom
feat/living-docs-addon

Conversation

@PBNZ

@PBNZ PBNZ commented Jul 13, 2026

Copy link
Copy Markdown
Owner

What & why

Docs that track live operational state drift when the only defence is prose rules: a RepoKit-scaffolded ops repo hit runbook/README drift (15 runbook-only commits despite an explicit same-commit rule), superseded content accreting under "superseded by v2" annotations, contradictory counts, and per-session formatting churn. This PR makes doc consistency structural: volatile facts live once in docs/STATE.json, docs render them via marker-delimited state blocks, and a deterministic pwsh 7 check-docs.ps1 (+ Core-tier docs.yml CI) enforces it - block drift, stale as_of dates, superseded-content markers, and table-style violations all fail the check, independent of which model or session edits the docs.

Shipped as an opt-in /new-repo add-on (a third axis orthogonal to type and tier - private repos stay light), plus two new repo-standard docs (living-docs.md, doc-style.md), doc-consistency steps in both checklists, and smoke_test_living_docs.ps1 proving the enforcement in CI with negative tests. Decision record: ADR-0006.

Checklist

  • One concern per PR (split unrelated changes).
  • Conventional Commit title (e.g. feat: ...).
  • CHANGELOG.md updated under ## [Unreleased] if user-visible.
  • Validation passes locally (python scripts/*.py; both pwsh smoke tests; e2e scaffold with and without the add-on).
  • An ADR added under docs/adr/ for any notable decision (ADR-0006).

🤖 Generated with Claude Code

… doc checks

A RepoKit-scaffolded ops repo showed that prose doc-sync rules do not hold
across sessions and models: runbook/README drift, superseded content accreting,
contradictory counts, and formatting churn. Make the fix structural instead:

- docs/STATE.json holds each volatile shared fact once (value + as_of + note);
  README.md and docs/**/*.md render facts via marker-delimited state blocks.
- scripts/check-docs.ps1 (pwsh 7) rewrites blocks (-Update) and enforces:
  blocks match the state file, no stale/future as_of, no superseded-content
  markers in the runbook, one table-separator style. docs.yml runs it in CI
  at the Core tier - enforcement is the point, especially in private repos.
- Packaged as an opt-in /new-repo add-on (templates/addons/living-docs/core),
  a third axis orthogonal to type and tier; add-ons only add files.
- New standard docs: living-docs.md (pattern + adopt-in-existing-repo recipe)
  and doc-style.md (deterministic formatting rules for all repos); both
  checklists gain doc-consistency steps.
- smoke_test_living_docs.ps1 proves the enforcement, negative tests included;
  validate.yml runs it on ubuntu-latest.

See ADR-0006 for the decision record and rejected alternatives (hand-written
HTML runbook, generated HTML, prose-only rules, YAML state file).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PBNZ
PBNZ merged commit e8cb11b into main Jul 13, 2026
3 checks passed
@PBNZ
PBNZ deleted the feat/living-docs-addon branch July 13, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant